<?php


namespace app\api\model;


class Discount extends BaseModel {

    protected $hidden = ['createtime','endtime'];

    public function getList(){
        return self::order('id desc')->select();
    }


    public function getDetail($id,$feild='*'){
        return self::field($feild)->where('id',$id)->find();
    }

}